﻿
using Admin.NET.Application.Entity;
using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 触发历史基础输入参数
    /// </summary>
    public class DeviceTriggerHistoryBaseInput
    {
        /// <summary>
        /// 设备名称
        /// </summary>
        public virtual long DeviceId { get; set; }
        
        /// <summary>
        /// 触发器ID
        /// </summary>
        public virtual long TriggerId { get; set; }
        
        /// <summary>
        /// 从机ID
        /// </summary>
        public virtual long SlaveId { get; set; }
        
        /// <summary>
        /// 点位ID
        /// </summary>
        public virtual long PointId { get; set; }
        
        /// <summary>
        /// 数据值
        /// </summary>
        public virtual string DataValue { get; set; }
        
        /// <summary>
        /// 触发状态
        /// </summary>
        public virtual TriggerStatus TriggerStatus { get; set; }
        
        /// <summary>
        /// 触发是否处理
        /// </summary>
        public virtual TriggerIsProcess TriggerIsProcess { get; set; }
        
        /// <summary>
        /// 处理说明
        /// </summary>
        public virtual string Mark { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        public virtual DateTime? CreateTime { get; set; }
        
        /// <summary>
        /// 更新时间
        /// </summary>
        public virtual DateTime? UpdateTime { get; set; }
        
        /// <summary>
        /// 创建者Id
        /// </summary>
        public virtual long? CreateUserId { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者Id
        /// </summary>
        public virtual long? UpdateUserId { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        public virtual bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 触发历史分页查询输入参数
    /// </summary>
    public class PageDeviceTriggerHistoryInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        public long? DeviceId { get; set; }
        
        /// <summary>
        /// 触发状态
        /// </summary>
        public TriggerStatus? TriggerStatus { get; set; }
        
        /// <summary>
        /// 触发是否处理
        /// </summary>
        public TriggerIsProcess? TriggerIsProcess { get; set; }
        
    }

    /// <summary>
    /// 触发历史增加输入参数
    /// </summary>
    public class AddDeviceTriggerHistoryInput : DeviceTriggerHistoryBaseInput
    {
        /// <summary>
        /// 触发是否处理
        /// </summary>
        [Required(ErrorMessage = "触发是否处理不能为空")]
        public override TriggerIsProcess TriggerIsProcess { get; set; }
        
        /// <summary>
        /// 处理说明
        /// </summary>
        [Required(ErrorMessage = "处理说明不能为空")]
        public override string Mark { get; set; }
        
        /// <summary>
        /// 软删除
        /// </summary>
        [Required(ErrorMessage = "软删除不能为空")]
        public override bool IsDelete { get; set; }
        
    }

    /// <summary>
    /// 触发历史删除输入参数
    /// </summary>
    public class DeleteDeviceTriggerHistoryInput : BaseIdInput
    {
    }

    /// <summary>
    /// 触发历史更新输入参数
    /// </summary>
    public class UpdateDeviceTriggerHistoryInput : DeviceTriggerHistoryBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 触发历史主键查询输入参数
    /// </summary>
    public class QueryByIdDeviceTriggerHistoryInput : DeleteDeviceTriggerHistoryInput
    {

    }
